<?php

class SRateTbl_3d extends SRate_3d
{

    public $sLottoId = 0;
    public $diskIdxArr = array
        (
        "a" => 1,
        "b" => 2,
        "c" => 3,
        "d" => 4
    );
    public $show5N = false;
    public $tblW = "753";
    public $tblW2 = "835";
    public $reloadUrl = "#";
    public $subURL = "#";
    public $tblNo = 0;
    public $subid = 0;
    public $nowDisk = 1;

    public function initData($gametype = 0)
    {
        $this->show5N = getShow35($gametype);
    }

    public function show_srateTbl($playtype = "r1", $disk = 1, $subid = 0, $bid = 14)
    {
        $this->nowDisk = $disk;
		switch ($playtype)
        {
            case "r1" :
                return $this->show_r1($disk, $subid);
            case "r2f" :
                return $this->show_r2f($disk, $subid);
            case "r1p" :
                return $this->show_r1p($disk, $subid);
            case "r2p" :
                return $this->show_r2p($disk, $bid, $subid);
            case "r2" :
                return $this->show_r2($disk, $subid) . $this->crt_jsSub();
            case "r2a" :
                return $this->show_r2a($disk, $subid);
            case "r3p" :
                return $this->show_r3p($disk, $subid);
            case "r3" :
                return $this->show_r3($disk, $subid) . $this->crt_jsSub();
            case "r3a" :
                return $this->show_r3a($disk, $subid);
            case "g3" :
                return $this->show_g($disk, $subid, true) . $this->crt_jsSub();
            case "g6" :
                return $this->show_g($disk, $subid, false) . $this->crt_jsSub();
            case "rcmp" :
                return $this->show_rcmp($disk, $subid);
            case "r1pass" :
                return $this->show_r1pass($disk, $subid);
            case "r1bs" :
                return $this->show_r1bs($disk, $subid);
            case "r1o" :
                return $this->show_r1o($disk, $subid);
			case "nn" :
                return $this->show_nn($disk,array ('牛1','牛2','牛3','牛4','牛5','牛6','牛7','牛8','牛9','牛牛','牛大','牛小','无牛','牛单','牛双'),74);
			case "sh" :
                return $this->show_nn($disk,array ('五条','四条','葫芦','顺子','三条','两对','单对','散号'),75);
            default :
                return "系统维护中";
        }
    }

    public function crt_0To9($rdata, $bettype = -1, $subid = 0, $disk = 1, $sTitle = "", $sPre = "", $emyTr = "")
    {
        $str = "";
        $str2 = "";
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        if ($rdata === false)
        {
            return "<tbody class=\"tbdRate\"><tr><td colspan=\"5\">查无" . $sTitle . "赔率资料</td></tr><tbody>";
        }
        $class = "gray" . $disk;
        $str = "<tr class=\"td2\" align=\"center\"><th class=\"" . $class . "\" rowspan=\"2\">" . $sTitle . "</th>";
        $str2 = "<tr class=\"td2\" align=\"center\">";
        $i = 0;
        while ($i < 10)
        {
            $setBtnName = $setBtnNamePre . $i;
            $tempStr = "<th class=\"td6\">" . $i . $sPre . "</th>";
            $rateIdx = "r" . str_pad($i, 2, "0", STR_PAD_LEFT);
            $rate = floatval($rdata[$rateIdx]);
            $tempStr .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" name=\"" . $setBtnName . "\" />";
            $tempStr .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $tempStr .= "</td>";
            if ($i % 2)
            {
                $str2 .= $tempStr;
            }
            else
            {
                $str .= $tempStr;
            }
            ++$i;
        }
        $str .= $emyTr . "</tr>";
        $str2 .= $emyTr . "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . $str2 . "<tbody>";
    }

    public function crt_0To9B($rdata, $bettype = -1, $subid = 0, $disk = 1, $sTitle = "", $sPre = "", $emyTr = "")
    {
        $str = "";
        $str2 = "";
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        if ($rdata == false)
        {
            $rdata = array ("r00" => 0, "r01" => 0, "r02" => 0, "r03" => 0, "r04" => 0, "r05" => 0, "r06" => 0, "r07" => 0, "r08" => 0, "r09" => 0);
        }
        $class = "gray" . $disk;
        $str = "<tr class=\"td2\" align=\"center\"><th class=\"" . $class . "\" rowspan=\"2\">" . $sTitle . "</th>";
        $str2 = "<tr class=\"td2\" align=\"center\">";
        $i = 0;
        while ($i < 10)
        {
            $setBtnName = $setBtnNamePre . $i;
            $tempStr = "<th class=\"td6\">" . $i . $sPre . "</th>";
            $rateIdx = "r" . str_pad($i, 2, "0", STR_PAD_LEFT);
            $rate = floatval($rdata[$rateIdx]);
            $tempStr .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" name=\"" . $setBtnName . "\" />";
            $tempStr .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $tempStr .= "</td>";
            if (4 < $i)
            {
                $str2 .= $tempStr;
            }
            else
            {
                $str .= $tempStr;
            }
            ++$i;
        }
        $str .= $emyTr . "</tr>";
        $str2 .= $emyTr . "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . $str2 . "</tbody>";
    }

    public function crt_00To99($dataArr = "")
    {
        if (!is_array($dataArr))
        {
            return "";
        }
        if (isset($dataArr['bettype']))
        {
            $bettype = $dataArr['bettype'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['rdata']))
        {
            $rdata = $dataArr['rdata'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['disk']))
        {
            $disk = $dataArr['disk'];
        }
        else
        {
            return "error disk";
        }
        if (isset($dataArr['title']))
        {
            $title = $dataArr['title'];
        }
        else
        {
            return "error title";
        }
        $rateShowArr = array (1 => "一般号码", 2 => "对对号码");
        $setBtnNamePre = "n_" . $bettype . "_0_" . $disk . "_";
        $str = "<tr class=\"td2\">";
        $str .= "<th>" . $title . "</th>";
        foreach ($rateShowArr as $rateShowArrKey => $rateShowArrVal)
        {
            $setBtnName = $setBtnNamePre . $rateShowArrKey;
            $rate = floatval($rdata["r0{$rateShowArrKey}"]);
            $str .= "<th class=\"td6\">" . $rateShowArrVal . "</th><td><input type=\"text\" name=\"" . $setBtnName . "\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
        }
        $str .= "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crt_00To99R2($dataArr = "")
    {
        if (!is_array($dataArr))
        {
            return "";
        }
        if (isset($dataArr['bettype']))
        {
            $bettype = $dataArr['bettype'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['rdata']))
        {
            $rdata = $dataArr['rdata'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['disk']))
        {
            $disk = $dataArr['disk'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['title']))
        {
            $title = $dataArr['title'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['subid']))
        {
            $subid = $dataArr['subid'];
        }
        else
        {
            return "";
        }
        $rateShowArr = array (1 => "一般号码", 2 => "对对号码");
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $str = "<tr class=\"td2\">";
        $str .= "<th>" . $title . "</th>";
        foreach ($rateShowArr as $rateShowArrKey => $rateShowArrVal)
        {
            $setBtnName = $setBtnNamePre . $rateShowArrKey;
            $rate = floatval($rdata["r0{$rateShowArrKey}"]);
            $str .= "<th class=\"td6\">" . $rateShowArrVal . "</th><td><input type=\"text\" name=\"" . $setBtnName . "\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
            break;
        }
        $str .= "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crt_0To18($rdata, $bettype = -1, $subid = 0, $disk = 1, $sTitle = "", $showType = 0)
    {
        $str = "";
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $class = "gray" . $disk;
        switch ($showType)
        {
            case 0 :
                $numArr = array ("0~4", "5", "6", "7", "8", "", "9", "10", "11", "12", "13", "14~18");
                $strArr = array (
                    "<tr class=\"td2\" align=\"center\"><th class=\"" . $class . "\" rowspan=\"2\">" . $sTitle . "</th>",
                    "<tr class=\"td2\" align=\"center\">"
                );
                $addKey = 4;
                $conNum = 0;
                break;
            case 1 :
                $numArr = array ("0~6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21~27");
                $strArr = array (
                    "<tr class=\"td2\" align=\"center\"><th class=\"" . $class . "\" rowspan=\"3\">" . $sTitle . "</th>",
                    "<tr class=\"td2\" align=\"center\">",
                    "<tr class=\"td2\" align=\"center\">"
                );
                $addKey = 6;
                $conNum = 2;
                break;
            default :
                exit("error crt0To18 case type");
                break;
        }
        $subI = 0;
        foreach ($numArr as $key => $val)
        {
            if ($val == "")
            {
                $strArr[$idx] .= "<td></td><td></td>";
                ++$subI;
                continue;
            }
            $i = $key + $addKey - $subI;
            $setBtnName = $setBtnNamePre . $i;
            $tempStr = "<th class=\"td6\">" . $val . "</th>";
            $rateIdx = "r" . str_pad($i, 2, "0", STR_PAD_LEFT);
            $rate = floatval($rdata[$rateIdx]);
            $tempStr .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" name=\"" . $setBtnName . "\" />";
            $tempStr .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $tempStr .= "</td>";
            $idx = $key / 6;
            $strArr[$idx] .= $tempStr;
        }
        $i = 0;
        while ($i < $conNum)
        {
            $strArr[$idx] .= "<td></td><td></td>";
            ++$i;
        }
        $str .= implode("</tr>", $strArr) . "</tr>";
        return "<tbody>" . $str . "</tbody>";
    }

    public function crt0To9QuickBtn($rdiArr = array (), $colSpanN = "11", $r0To9Flag = true, $showArr = array
        (
        0 => 1,
        1 => 1,
        2 => 1
    ), $next = 0)
    {
        $rdiStr = "";
        $titleLabel = "";
        $tblNo = $this->tblNo;
        if (1 < count($rdiArr))
        {
            $rdiStr .= "玩法快调";
            $i = 0;
            foreach ($rdiArr as $key => $val)
            {
                $tempStr = 0 < $i ? "" : "checked";
                $rdiStr .= "<label><input type=\"radio\" name=\"rdiQuick" . $tblNo . "\" value=\"" . $i . "\" " . $tempStr . " />" . $val . "</label>";
                ++$i;
                if ($next && $i % $next == 0)
                {
                    $rdiStr .= "<br />";
                }
            }
            $rdiStr .= "<br />";
        }
        else
        {
            foreach ($rdiArr as $key => $val)
            {
                $titleLabel = "";
                $rdiStr .= "<label><input type=\"radio\" name=\"rdiQuick" . $tblNo . "\" value=\"0\" checked />" . $val . "快调</label>";
            }
            $rdiStr .= "<br />";
        }
        $twoFStr = " class=\"twoF\"";
        $btnStr0To9 = "";
        if ($r0To9Flag)
        {
            $btnStr0To9 = "◎";
            $i = 0;
            while ($i < 10)
            {
                $btnStr0To9 .= "&nbsp;<input type=\"button\" class=\"btnchoice\" id=\"btnMyId" . $tblNo . "_" . $i . "\" value=\"" . $i . "\" />";
                ++$i;
            }
            $twoFStr = "";
        }
        $str3 = "<tr class=\"td2\"><td colspan=\"" . $colSpanN . "\"  id=\"myTbltd_" . $tblNo . "\" style=\"text-align:right;\" " . $twoFStr . ">&nbsp;";
        $str3 .= $rdiStr;
        $str3 .= $titleLabel . "&nbsp;增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" />&nbsp;<span class=\"btnPositionType\"><input type=\"button\" class=\"btnchoice\" value=\"全部\" id=\"btnMyId" . $tblNo . "_999\" />&nbsp;";
        $str3 .= $showArr[0] ? "<input type=\"button\" class=\"btnchoice\" value=\"大\" id=\"btnMyId" . $tblNo . "_91\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"小\" id=\"btnMyId" . $tblNo . "bs_92\" />" : "";
        $str3 .= $showArr[1] ? "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"单\" id=\"btnMyIdsd" . $tblNo . "_81\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"双\" id=\"btnMyId" . $tblNo . "_82\" />" : "";
        $str3 .= $showArr[2] ? "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"质\" id=\"btnMyId" . $tblNo . "_71\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"合\" id=\"btnMyId" . $tblNo . "_72\" />" : "";
        $str3 .= $btnStr0To9;
        $str3 .= "</span></td></tr>";
        $this->tblNo++;
        return $str3;
    }

    public function crt_000To999($dataArr = "", $titleStr = "")
    {
        if (!is_array($dataArr))
        {
            return "";
        }
        if (isset($dataArr['bettype']))
        {
            $bettype = $dataArr['bettype'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['rdata']))
        {
            $rdata = $dataArr['rdata'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['disk']))
        {
            $disk = $dataArr['disk'];
        }
        else
        {
            return "";
        }
        $rateShowArr = array (1 => "一般号码", 2 => "对对号码", 3 => "&#35961;子号码");
        $setBtnNamePre = "n_" . $bettype . "_0_" . $disk . "_";
        $str = "<tr class=\"td2\">";
        foreach ($rateShowArr as $rateShowArrKey => $rateShowArrVal)
        {
            $setBtnName = $setBtnNamePre . $rateShowArrKey;
            $rate = floatval($rdata["r0{$rateShowArrKey}"]);
            $str .= "<th class=\"td6\">" . $rateShowArrVal . "</th><td><input type=\"text\" name=\"" . $setBtnName . "\" class=\"iptRate\" size=\"5\" value=\"" . $rate . "\" />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
        }
        $str .= "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crt_000To999R3($dataArr = "", $titleStr = "")
    {
        if (!is_array($dataArr))
        {
            return "";
        }
        if (isset($dataArr['bettype']))
        {
            $bettype = $dataArr['bettype'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['rdata']))
        {
            $rdata = $dataArr['rdata'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['disk']))
        {
            $disk = $dataArr['disk'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['subid']))
        {
            $subid = $dataArr['subid'];
        }
        else
        {
            return "";
        }
        if (isset($dataArr['title']))
        {
            $title = $dataArr['title'];
        }
        else
        {
            return "";
        }
        $rateShowArr = array (1 => "一般号码", 2 => "对对号码", 3 => "&#35961;子号码");
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $str = "<tr class=\"td2\">";
        $str .= "<th class=\"td6\">" . $title . "</th>";
        foreach ($rateShowArr as $rateShowArrKey => $rateShowArrVal)
        {
            $setBtnName = $setBtnNamePre . $rateShowArrKey;
            $rate = floatval($rdata["r0{$rateShowArrKey}"]);
            $str .= "<th class=\"td6\">" . $rateShowArrVal . "</th><td><input type=\"text\" name=\"" . $setBtnName . "\" class=\"iptRate\" size=\"5\" value=\"" . $rate . "\" />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
        }
        $str .= "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crtDblQuickBtn($btnFlag, $len = 2)
    {
        $str = "";
        $tblNo = $this->tblNo;
        $dblFlag = isset($btnFlag[0]) && $btnFlag[0];
        $comFlag = isset($btnFlag[1]) && $btnFlag[1];
        $lprFlag = isset($btnFlag[2]) && $btnFlag[2];
        $str .= "&nbsp;增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" />&nbsp;<span class=\"btnPositionType\">";
        $str .= "<input type=\"button\" value=\"全部\" class=\"colorBtn01 clrBrd_" . $this->gametype . "\" id=\"btnMyId" . $tblNo . "_999\"  />";
        if ($dblFlag)
        {
            $str .= "&nbsp;<input type=\"button\" value=\"对对\" class=\"colorBtn01 clrBrd_" . $this->gametype . "\" id=\"" . $len . "btnMyId" . $tblNo . "_12\" />";
        }
        if ($comFlag)
        {
            $str .= "&nbsp;<input type=\"button\" value=\"一般\" class=\"colorBtn01 clrBrd_" . $this->gametype . "\" id=\"" . $len . "btnMyId" . $tblNo . "_11\" />";
        }
        if ($lprFlag)
        {
            $str .= "&nbsp;<input type=\"button\" value=\"豹\子\" class=\"colorBtn01 clrBrd_" . $this->gametype . "\" id=\"" . $len . "btnMyId" . $tblNo . "_13\" />";
        }
        $str .= "</span>";
        return $str;
    }

    public function crtDblSubmitBtn($url = "")
    {
        global $g_disk_name;
        $str = "";
        $str .= "<input type=\"submit\" value=\"确定更改 :: " . $g_disk_name[$this->nowDisk] . "\" class=\"colorBtnGray\"  />";
        $str .= "&nbsp;<input type=\"button\" value=\"重读\" onclick=\"javascript:location.replace(" . "'" . $this->reloadUrl . "'" . ");\" class=\"colorBtnGray\"  />";
        return $str;
    }

    public function crt_2face_com($rdata, $bettype, $subid, $sTitle, $showTitleArr, $disk = 1)
    {
        $str = "";
        $setBtnId = "";
        $class = "gray" . $disk;
        $str .= "<tr class=\"td2\" align=center><th class=\"" . $class . "\">" . $sTitle . "</th>";
        $l = count($showTitleArr);
        for ($i = 0; $i < $l; $i++)
        {
            if ($showTitleArr[$i] == "")
            {
                $str .= "<td></td><td></td><td></td><td></td>";
                continue;
            }
            if ($rdata[$i] === false)
            {
                $rdata[$i] = array ("r01" => 0, "r02" => 0);
            }
            $setBtnNamePre = "n_" . $bettype[$i] . "_" . $subid[$i] . "_" . $disk . "_";
            $setBtnName = $setBtnNamePre . "1";
            $rate = floatval($rdata[$i]['r01']);
            $str .= "<th class=td6>" . $showTitleArr[$i][0] . "</th>";
            $str .= "<td>";
            $str .= "<input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\" />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
            $rate = floatval($rdata[$i]['r02']);
            $setBtnName = $setBtnNamePre . "2";
            $str .= "<th class=td6>" . $showTitleArr[$i][1] . "</th>";
            $str .= "<td>";
            $str .= "<input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
        }
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crt_3face_com($rdata, $bettype, $subid, $sTitle, $showTitleArr, $disk = 1)
    {
        $str = "";
        $setBtnId = "";
        $class = "gray" . $disk;
        $str .= "<tr class=\"td2\" align=center><th class=\"" . $class . "\">" . $sTitle . "</th>";
        $l = count($showTitleArr);
        for ($i = 0; $i < $l; $i++)
        {
            if ($showTitleArr[$i] == "")
            {
                $str .= "<td></td><td></td><td></td><td></td><td></td><td></td>";
                continue;
            }
            $rdataStr = $rdata[$i];
            if ($rdataStr === false)
            {
                $rdataStr = array ("r01" => 0, "r02" => 0, "r03" => 0);
            }
            $setBtnNamePre = "n_" . $bettype[$i] . "_" . $subid[$i] . "_" . $disk . "_";
            $rate = floatval($rdataStr['r01']);
            $setBtnName = $setBtnNamePre . "1";
            $str .= "<th class=td6>" . $showTitleArr[$i][0] . "</th>";
            $str .= "<td>";
            $str .= "<input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\" />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
            $rate = floatval($rdataStr['r02']);
            $setBtnName = $setBtnNamePre . "2";
            $str .= "<th class=td6>" . $showTitleArr[$i][1] . "</th>";
            $str .= "<td>";
            $str .= "<input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
            $rate = floatval($rdataStr['r03']);
            $setBtnName = $setBtnNamePre . "3";
            $str .= "<th class=td6>" . $showTitleArr[$i][2] . "</th>";
            $str .= "<td>";
            $str .= "<input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
        }
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crt_g($rdataArr)
    {
        if (isset($rdataArr['bettype']))
        {
            $bettype = intval($rdataArr['bettype']);
        }
        else
        {
            return "";
        }
        if (isset($rdataArr['rdataStr']))
        {
            $rdataStr = $rdataArr['rdataStr'];
        }
        else
        {
            return "";
        }
        if (isset($rdataArr['subid']))
        {
            $subid = $rdataArr['subid'];
        }
        else
        {
            return "";
        }
        if (isset($rdataArr['disk']))
        {
            $disk = $rdataArr['disk'];
        }
        else
        {
            return "";
        }
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $str = "<table class=\"tblMy3D\" width=\"100%\" style=\"text-align:center\"><thead><tr class=\"td15\"><th>号码</th><th>赔率</th></tr></thead>";
        $str .= "<tbody class=\"tbdRate\">";
        if ($bettype == 29)
        {
            $rate = floatval($rdataStr['r01']);
            $setBtnName = $setBtnNamePre . "1";
            $str .= "<tr class=\"td2\" align=\"right\"><th class=\"td6\" align=\"center\">全包</th>";
            $str .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
            $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $str .= "</td>";
            $str .= "</tr>";
        }
        else
        {
            $i = 0;
            while ($i < 10)
            {
                $rateIdx = "r" . str_pad($i, 2, "0", STR_PAD_LEFT);
                $rate = floatval($rdataStr[$rateIdx]);
                $setBtnName = $setBtnNamePre . $i;
                $str .= "<tr class=\"td2\"><th class=\"td6\">" . $i . "</th><td><input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
                $str .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
                $str .= "</td></tr>";
                ++$i;
            }
        }
        $str .= "</tbody>";
        $str .= "</table>";
        return $str;
    }

    public function crt_jsSub()
    {
        if (!$this->show5N)
        {
            return "";
        }
        $strTbl = "";
        $strTbl .= "<script>";
        $strTbl .= "\$(function(){ \$(\"#spnBetBtn input:button\").click(function(){ ";
        $strTbl .= " var subid = \$(this).index();";
        $strTbl .= "var url = \"" . $this->subURL . "\";";
        $strTbl .= "var urlId = 0;";
        $strTbl .= "switch(subid){";
        $strTbl .= "case 0 : urlId = \"2\"; break;";
        $strTbl .= "case 1 : urlId = \"1\"; break;";
        $strTbl .= " case 2 : urlId = \"0\"; break;";
        $strTbl .= "}";
        $strTbl .= "window.location.replace(url + \"&subid=\" + urlId);";
        $strTbl .= " }); });";
        $strTbl .= "</script>";
        return $strTbl;
    }

}

class SRateTbl_3n extends SRateTbl_3d
{

    public function show_r1($disk = 1)
    {
        $strDisk = "";
        $idx = $disk;
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW2 . "\" >";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        if ($rateArr = parent::getrates($this->sLottoId, $disk, 0, 0))
        {
            $strTbl .= $this->crt_0To9($rateArr, 0, 0, $disk, "一字组合");
        }
        $strTbl .= $this->crt0To9QuickBtn(array ("一字组合"), 11);
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table><br /><table class=\"tblMy3D\" width=\"" . $this->tblW2 . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 4, 0),
            parent::getrates($this->sLottoId, $disk, 7, 0),
            parent::getrates($this->sLottoId, $disk, 10, 0)
                ), array (4, 7, 10), array (0, 0, 0), "佰定位<br />OXX", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 5, 0),
            parent::getrates($this->sLottoId, $disk, 8, 0),
            parent::getrates($this->sLottoId, $disk, 11, 0)
                ), array (5, 8, 11), array (0, 0, 0), "拾定位<br />XOX", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 6, 0),
            parent::getrates($this->sLottoId, $disk, 9, 0),
            parent::getrates($this->sLottoId, $disk, 12, 0)
                ), array (6, 9, 12), array (0, 0, 0), "个定位<br />XXO", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            "",
            parent::getrates($this->sLottoId, $disk, 17, 0),
            ""
                ), array ("", 17, ""), array (0, 0, 0), "佰拾和数<br />OOX", array (
            "",
            array ("单", "双"),
            ""
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            "",
            parent::getrates($this->sLottoId, $disk, 18, 0),
            ""
                ), array ("", 18, ""), array (0, 0, 0), "佰个和数<br />OXO", array (
            "",
            array ("单", "双"),
            ""
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            "",
            parent::getrates($this->sLottoId, $disk, 19, 0),
            ""
                ), array ("", 19, ""), array (0, 0, 0), "拾个和数<br />XOO", array (
            "",
            array ("单", "双"),
            ""
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 22, 0),
            parent::getrates($this->sLottoId, $disk, 23, 0),
            ""
                ), array (
            22,
            23,
            0 - 1
                ), array (0, 0, 0), "佰拾个和数<br />OOO", array (
            array ("大", "小"),
            array ("单", "双"),
            ""
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 44, 0),
            "",
            parent::getrates($this->sLottoId, $disk, 45, 0)
                ), array (
            44,
            0 - 1,
            45
                ), array (0, 0, 0), "佰拾个和数尾数<br />OOO", array (
            array ("尾大", "尾小"),
            "",
            array ("尾质", "尾合")
                ), $disk);
        $strTbl .= $this->crt0To9QuickBtn(array ("佰定位", "拾定位", "个定位", "佰拾和数", "佰个和数", "拾个和数", "佰拾个和数", "佰拾个和数尾数"), 13, false);
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1p($disk = 1)
    {
        $strTbl = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $showArr = array (1 => "佰定位<br />XXOXX", 2 => "拾定位<br />XXXOX", 3 => "个定位<br />XXXXO");
        foreach ($showArr as $key => $val)
        {
            $rateStr = parent::getrates($this->sLottoId, $disk, $key, 0);
            $strTbl .= $this->crt_0To9($rateStr, $key, 0, $disk, $val);
        }
        $strTbl .= $this->crt0To9QuickBtn(array (1 => "佰定位", 2 => "拾定位", 3 => "个定位"));
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r2p($disk = 1, $bettype = 14, $subid = 0)
    {
        $strTbl = "";
        $tblNo = $this->tblNo;
        $betArr = array (14 => "佰拾定位OOX", 15 => "佰个定位OXO", 16 => "拾个定位XOO");
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . intval($this->tblW * 0.7) . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">二字定位</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= "<tr><th>玩法</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        foreach ($betArr as $betArrKey => $betArrVal)
        {
            $dataArr = array (
                "bettype" => $betArrKey,
                "rdata" => parent::getrates($this->sLottoId, $disk, $betArrKey, 0),
                "disk" => $disk,
                "title" => $betArrVal
            );
            $strTbl .= $this->crt_00To99($dataArr);
        }
        $strTbl .= "<tr><td colspan=\"5\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"5\" class=\"td2\"  align=\"right\"><a class=\"tooltipsSite\" href=\"#tooltipsSite\"><img src=\"image/help01.png\" alt=\"说明\" border=\"0\" width=\"20\"><SPAN><DIV  style=\"text-align:left\">一般号码包含 : 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 12, 13, 14, 15... 等不为对对号码之号码组?<hr />对对号码包含 : 00, 11, 22, 33, 44, 55, 66, 77, 88, 99</DIV></SPAN></a></td></tr>";
        $strTbl .= "</table>";
        $this->tblNo++;
        return $strTbl;
    }

    public function show_r2($disk = 1)
    {
        $tblNo = $this->tblNo;
        $strTbl = "";
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . intval($this->tblW * 0.7) . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">二字组AA合</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= "<tr><th>玩法</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $dataArr = array (
            "bettype" => 13,
            "rdata" => parent::getrates($this->sLottoId, $disk, 13, 0),
            "disk" => $disk,
            "title" => "二字组合"
        );
        $strTbl .= $this->crt_00To99($dataArr);
        $strTbl .= "<tr><td colspan=\"5\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"5\" class=\"td2\"  align=\"right\"><a class=\"tooltipsSite\" href=\"#tooltipsSite\"><img src=\"image/help01.png\" alt=\"说明\" border=\"0\" width=\"20\"><SPAN><DIV  style=\"text-align:left\">一般号码包含 : 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 12, 13, 14, 15... 等不为对对号码之号码组?<hr />对对号码包含 : 00, 11, 22, 33, 44, 55, 66, 77, 88, 99</DIV></SPAN></a></td></tr>";
        $strTbl .= "</table>";
        $this->tblNo++;
        return $strTbl;
    }

    public function show_r2a($disk = 1)
    {
        $strTbl = "";
        $showTypeArr = array (
            array (36, "百拾和数OOX", 39, "百拾和数尾数OOX"),
            array (37, "百个和数OXO", 40, "百个和数尾数OXO"),
            array (38, "拾个和数XOO", 41, "拾个和数尾数XOO")
        );
        foreach ($showTypeArr as $val)
        {
            $dataArr = array (
                "bettype" => $val[0],
                "rdata" => parent::getrates($this->sLottoId, $disk, $val[0], 0)
            );
            $strTbl .= "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
            $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $val[1] . "</caption>";
            $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
            $strTbl .= "<tr><th>类别</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
            $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
            $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
            $strTbl .= "</tr></thead>";
            if ($rateStr = parent::getrates($this->sLottoId, $disk, $val[0], 0))
            {
                $strTbl .= $this->crt_0To18($rateStr, $val[0], 0, $disk, $val[1]);
            }
            if ($rateStr = parent::getrates($this->sLottoId, $disk, $val[2], 0))
            {
                $strTbl .= $this->crt_0To9B($rateStr, $val[2], 0, $disk, $val[3], "尾", "<td></td><td></td>");
            }
            $strTbl .= $this->crt0To9QuickBtn(array (
                $val[3]
                    ), "13");
            $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
            $strTbl .= "</table>";
        }
        return $strTbl;
    }

    public function show_r3p($disk = 1)
    {
        $tblNo = $this->tblNo;
        $strTbl = "";
        $titleTr = "<tr><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th></tr>";
        $dataArr = array (
            "bettype" => 21,
            "rdata" => parent::getrates($this->sLottoId, $disk, 21, 0),
            "disk" => $disk
        );
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . intval($this->tblW * 0.7) . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">三字定位</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= $titleTr;
        $strTbl .= "</thead>";
        $strTbl .= $this->crt_000To999($dataArr, $titleTr);
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\"  align=\"right\"><a class=\"tooltipsSite\" href=\"#tooltipsSite\"><img src=\"image/help01.png\" alt=\"说明\" border=\"0\" width=\"20\"><SPAN><DIV  style=\"text-align:left\">一般号码包含 : 012, 013, 014, 015, 016, 017, 018... 等三码都相异之号码组?<hr />对对号码包含 : 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011...等,有2码相同1码相异的号码组<hr />&#35961;子号码包含 : 000, 111, 222, 333, 444, 555, 666, 777, 888, 999 三码都相同之号码组</DIV></SPAN></a></td></tr>";
        $strTbl .= "</table>";
        $this->tblNo++;
        return $strTbl;
    }

    public function show_r3($disk = 1, $subid = 0)
    {
        $tblNo = $this->tblNo;
        $strTbl = "";
        $titleTr = "<tr><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th></tr>";
        $dataArr = array (
            "bettype" => 20,
            "rdata" => parent::getrates($this->sLottoId, $disk, 20, 0),
            "disk" => $disk
        );
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . intval($this->tblW * 0.7) . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">三字组合</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= $titleTr;
        $strTbl .= "</thead>";
        $strTbl .= $this->crt_000To999($dataArr, $titleTr);
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\"  align=\"right\"><a class=\"tooltipsSite\" href=\"#tooltipsSite\"><img src=\"image/help01.png\" alt=\"说明\" border=\"0\" width=\"20\"><SPAN><DIV  style=\"text-align:left\">一般号码包含 : 012, 013, 014, 015, 016, 017, 018... 等三码都相异之号码组?<hr />对对号码包含 : 001, 002, 003, 004, 005, 006, 007, 008, 009, 011...等,有2码相同1码相异的号码组<hr />&#35961;子号码包含 : 000, 111, 222, 333, 444, 555, 666, 777, 888, 999 三码都相同之号码组</DIV></SPAN></a></td></tr>";
        $strTbl .= "</table>";
        $this->tblNo++;
        return $strTbl;
    }

    public function show_r3a($disk = 1)
    {
        $strTbl = "";
        $dataArr = array (
            "bettype" => 42,
            "rdata" => parent::getrates($this->sLottoId, $disk, 42, 0)
        );
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">佰拾个和数OOO</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= "<tr><th>类别</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $rateStr = parent::getrates($this->sLottoId, $disk, 42, 0);
        if ($rateStr !== false)
        {
            $strTbl .= $this->crt_0To18($rateStr, 42, 0, $disk, "佰拾个和数OOO", 1);
        }
        $rateStr = parent::getrates($this->sLottoId, $disk, 43, 0);
        if ($rateStr !== false)
        {
            $strTbl .= $this->crt_0To9($rateStr, 43, 0, $disk, "佰拾个和数尾数OOO", "尾", "<td></td><td></td>");
        }
        $strTbl .= $this->crt0To9QuickBtn(array ("佰拾个和数尾数"), "13");
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_g($disk = 1, $subid = 0, $g3Flag = true)
    {
        $strTbl = "";
        $strArr = array ();
        if ($g3Flag)
        {
            $showArr = array (24 => 5, 25 => 6, 26 => 7, 27 => 8, 28 => 9, 29 => "全包");
            $sTitle = "组选三";
        }
        else
        {
            $showArr = array (30 => 4, 31 => 5, 32 => 6, 33 => 7, 34 => 8);
            $sTitle = "组选六";
        }
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\" cellpadding=\"0\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $sTitle . "</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= "<tr>";
        $btnArr = array ();
        foreach ($showArr as $key => $val)
        {
            $strTbl .= "<th><input class=\"btnmin\" type=\"button\" value=\"-\"/>&nbsp;" . $val . "&nbsp;<input class=\"btnplus\" type=\"button\" value=\"+\"/></th>";
            $btnArr[$key] = "选" . $val . "码";
            $rdataArr = array (
                "bettype" => $key,
                "rdataStr" => parent::getrates($this->sLottoId, $disk, $key, $subid),
                "subid" => $subid,
                "disk" => $disk
            );
            $strArr[$key] = "<td valign=\"top\" style=\"padding:0;\">" . $this->crt_g($rdataArr) . "</td>";
        }
        unset($btnArr[29]);
        $strTbl .= "</tr></thead>";
        $strTbl .= "<tbody>";
        $strTbl .= "<tr id=\"myGTr\">" . implode("", $strArr) . "</tr>";
        $strTbl .= "</tbody>";
        $strTbl .= $this->crt0To9QuickBtn($btnArr, 6, true);
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_rcmp($disk = "a")
    {
        $tblNo = $this->tblNo;
        $strTbl = "";
        $titleTr = "<tr><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th></tr>";
        $dataArr = array (
            "bettype" => 35,
            "rdata" => parent::getrates($this->sLottoId, $disk, 35, 0),
            "disk" => $disk
        );
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . intval($this->tblW * 0.7) . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">复式组合</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= $titleTr;
        $strTbl .= "</thead>";
        $strTbl .= $this->crt_000To999($dataArr, $titleTr);
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"6\" class=\"td2\"  align=\"right\"><a class=\"tooltipsSite\" href=\"#tooltipsSite\"><img src=\"image/help01.png\" alt=\"说明\" border=\"0\" width=\"20\"><SPAN><DIV  style=\"text-align:left\">一般号码包含 : 012, 013, 014, 015, 016, 017, 018... 等三码都相异之号码组?<hr />对对号码包含 : 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011...等,有2码相同1码相异的号码组<hr />&#35961;子号码包含 : 000, 111, 222, 333, 444, 555, 666, 777, 888, 999 三码都相同之号码组</DIV></SPAN></a></td></tr>";
        $strTbl .= "</table>";
        $this->tblNo++;
        return $strTbl;
    }

    public function show_r1pass($disk = 1)
    {
        $titleArr = array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
        );
        $strTbl = "";
        $subid = 0;
        $bettype = 46;
        $rdata = parent::getrates($this->sLottoId, $disk, 46, 0);
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">一字过关</caption>";
        $strTbl .= "<thead><tr class=\"td6\"><th colspan=\"4\">佰</th><th colspan=\"4\">拾</th><th colspan=\"4\">个</th></tr>";
        $strTbl .= "<tr class=\"td6\"><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th></tr>";
        $strTbl .= "</thead>";
        $i = 0;
        while ($i < 3)
        {
            $strTbl .= "<tr class=\"td2\">";
            $j = 0;
            while ($j < 3)
            {
                $k = 6 * $j + $i * 2;
                $setBtnName = $setBtnNamePre . $k;
                $rateIdx = "r" . str_pad($k, 2, "0", STR_PAD_LEFT);
                $rate = floatval($rdata[$rateIdx]);
                $strTbl .= "<th class=\"td6\">" . $titleArr[$i][0] . "</th>";
                $strTbl .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
                $strTbl .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
                $strTbl .= "</td>";
                $k += 1;
                $rateIdx = "r" . str_pad($k, 2, "0", STR_PAD_LEFT);
                $rate = floatval($rdata[$rateIdx]);
                $setBtnName = $setBtnNamePre . $k;
                $strTbl .= "<th class=\"td6\">" . $titleArr[$i][1] . "</th>";
                $strTbl .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
                $strTbl .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
                $strTbl .= "</td>";
                ++$j;
            }
            $strTbl .= "</tr>";
            ++$i;
        }
        $strTbl .= "<tr><td colspan=\"12\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1bs($disk = 1, $subid = 0)
    {
        $strDisk = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        if ($rateStr = parent::getrates($this->sLottoId, $disk, 47, 0))
        {
            $strTbl .= $this->crt_0To9B($rateStr, 47, 0, $disk, "跨度");
        }
        $strTbl .= $this->crt0To9QuickBtn(array ("跨度"), 11);
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1o($disk = 1, $subid = 0)
    {
        global $g_betname_3d;
        $strDisk = "";
        $class = "gray" . $disk;
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $strTbl .= "<tbody>";
        $strTbl .= "<tr class=\"td2\"><th class=\"" . $class . "\">其他</th>";
        $i = 48;
        while ($i < 53)
        {
            $setBtnName = "n_" . $i . "_" . $subid . "_" . $disk . "_0";
            $rateArr = parent::getrates($this->sLottoId, $disk, $i, 0);
            $rate = floatval($rateArr['r00']);
            $strTbl .= "<th class=\"td6\">" . $g_betname_3d[$i] . "</th>";
            $strTbl .= "<td align=\"center\"><input type=\"text\" class=\"iptRate\" size=\"3\" name=\"" . $setBtnName . "\" value=\"" . $rate . "\"  />";
            $strTbl .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
            $strTbl .= "</td>";
            ++$i;
        }
        $strTbl .= "</tr>";
        $rateStr = parent::getrates($this->sLottoId, $disk, 53, 0);
        if ($rateStr !== false)
        {
            $strTbl .= $this->crt_0To9B($rateStr, 53, 0, $disk, "准对");
        }
        $rateStr = parent::getrates($this->sLottoId, $disk, 54, 0);
        if ($rateStr !== false)
        {
            $strTbl .= $this->crt_0To9B($rateStr, 54, 0, $disk, "不出牌");
        }
        $strTbl .= $this->crt0To9QuickBtn(array ("准对", "不出牌"), 11);
        $strTbl .= "</tbody>";
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

}

class SRateTbl_5n extends SRateTbl_3d
{

    public $betArr = array
        (
        2 => "前三",
        1 => "中三",
        0 => "後三"
    );

    public function show_r1($disk = 1)
    {
        $strDisk = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $rateStr = parent::getrates($this->sLottoId, $disk, 55, 0);
        $strTbl .= $this->crt_0To9($rateStr, 55, 0, $disk, "全五一字组合<br />OOOOO");
        $rateStr = parent::getrates($this->sLottoId, $disk, 0, 2);
        $strTbl .= $this->crt_0To9($rateStr, 0, 2, $disk, "前三一字组合<br />OOXXX");
        $rateStr = parent::getrates($this->sLottoId, $disk, 0, 1);
        $strTbl .= $this->crt_0To9($rateStr, 0, 1, $disk, "中三一字组合<br />OXXXO");
        $rateStr = parent::getrates($this->sLottoId, $disk, 0, 0);
        $strTbl .= $this->crt_0To9($rateStr, 0, 0, $disk, "後三一字组合<br />OOXXX");
        $strTbl .= $this->crt0To9QuickBtn(array ("55_0" => "全五一字组合", "0_2" => "前三一字组合", "0_1" => "中三一字组合", "0_0" => "後三一字组合"));
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table><br /><table class=\"tblMy3D\" width=\"" . $this->tblW2 . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 56, 0),
            parent::getrates($this->sLottoId, $disk, 57, 0),
            parent::getrates($this->sLottoId, $disk, 58, 0)
                ), array (56, 57, 58), array (0, 0, 0), "第一球<br />OXXXX", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 59, 0),
            parent::getrates($this->sLottoId, $disk, 60, 0),
            parent::getrates($this->sLottoId, $disk, 61, 0)
                ), array (59, 60, 61), array (0, 0, 0), "第二球<br />XOXXX", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 4, 0),
            parent::getrates($this->sLottoId, $disk, 7, 0),
            parent::getrates($this->sLottoId, $disk, 10, 0)
                ), array (4, 7, 10), array (0, 0, 0), "第三球<br />XXOXX", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 5, 0),
            parent::getrates($this->sLottoId, $disk, 8, 0),
            parent::getrates($this->sLottoId, $disk, 11, 0)
                ), array (5, 8, 11), array (0, 0, 0), "第四球<br />XXXOX", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 6, 0),
            parent::getrates($this->sLottoId, $disk, 9, 0),
            parent::getrates($this->sLottoId, $disk, 12, 0)
                ), array (6, 9, 12), array (0, 0, 0), "第五球<br />XXXXO", array (
            array ("大", "小"),
            array ("单", "双"),
            array ("质", "合")
                ), $disk);
        $strTbl .= $this->crt_2face_com(array (
            parent::getrates($this->sLottoId, $disk, 72, 0),
            parent::getrates($this->sLottoId, $disk, 71, 0),
            0
                ), array (72, 71, 0), array (0, 0, 0), "总和", array (
            array ("总大", "总小"),
            array ("总单", "总双"),
            ""
                ), $disk);
        $strTbl .= $this->crt_3face_com(array (
            parent::getrates($this->sLottoId, $disk, 73, 0),
            0,
            0
                ), array (73, 0, 0), array (0, 0, 0), "龙虎和", array (
            array ("龙", "虎", "和"),
            ""
                ), $disk);
        $strTbl .= $this->crt0To9QuickBtn(array ("第一球", "第二球", "第三球", "第四球", "第五球", "总和"), 13, false);
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r2f($disk = 1)
    {
        $strTbl = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"400\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $showArr = array (62 => "万千和数 OOXXX", 63 => "万佰和数 OXOXX", 64 => "万拾和数 OXXOX", 65 => "万个和数 OXXXO", 66 => "千佰和数 XOOXX", 67 => "千拾和数 XOXOX", 68 => "千个和数 XOXXO", 17 => "佰拾和数 XXOOX", 18 => "佰个和数 XXOXO", 19 => "拾个和数 XXXOO");
        foreach ($showArr as $key => $val)
        {
            $strTbl .= $this->crt_2face_com(array (
                parent::getrates($this->sLottoId, $disk, $key, 0)
                    ), array (
                $key
                    ), array (0), $val, array (
                array ("单", "双")
                    ), $disk);
        }
        $strTbl .= $this->crt0To9QuickBtn(array ("双面和数"), "5", false, array (0, 1, 0), 2);
        $strTbl .= "<tr><td colspan=\"5\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1p($disk = 1)
    {
        $strTbl = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $showArr = array (69 => "第一球<br />OXXXX", 70 => "第二球<br />XOXXX", 1 => "第三球<br />XXOXX", 2 => "第四球<br />XXXOX", 3 => "第五球<br />XXXXO");
        foreach ($showArr as $key => $val)
        {
            $rateStr = parent::getrates($this->sLottoId, $disk, $key, 0);
            $strTbl .= $this->crt_0To9($rateStr, $key, 0, $disk, $val);
        }
        $strTbl .= $this->crt0To9QuickBtn(array (69 => "第一球", 70 => "第二球", 1 => "第三球", 2 => "第四球", 3 => "第五球"));
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r2($disk = 1, $subid = 0)
    {
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
		$arr=array ('豹子','顺子','对子','半顺','杂六');
		$arr2=array(2=>'前三其它',1=>'中三其它',0=>'后三其它');
		foreach($arr2 as $keys=>$val){
			$strTbl .= "<tr class=\"td2\" align=\"center\">";
			$strTbl .= "<th class=\"td6\">$val</th>";
			$rdata = parent::getrates($this->sLottoId, $disk, 76,$keys);
			for($i=0;$i<5;$i++){
				$setBtnName =  "n_76_".$keys."_" . $disk . "_" . $i;
				$strTbl .= "<td>".$arr[$i]."</td>";
				$rateIdx = "r" . str_pad($i, 2, "0", STR_PAD_LEFT);
				$rate = floatval($rdata[$rateIdx]);
				$strTbl .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" name=\"" . $setBtnName . "\" />";
				$strTbl .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
				$strTbl .= "</td>";
			}
			$strTbl .= "</tr>";
		}
        $strTbl .= "<tr><td colspan=11 class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r3($disk = 1, $subid = 0)
    {
        $tblNo = $this->tblNo;
        $strTbl = "";
        $subidArr = array (2 => "前三三字组合", 1 => "中三三字组合", 0 => "後三三字组合");
        $titleTr = "<tr><th>类别</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th><th>项目</th><th>赔率</th></tr>";
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">三字组合</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= $titleTr;
        $strTbl .= "</thead>";
        foreach ($subidArr as $subidkey => $subidval)
        {
            $dataArr = array (
                "bettype" => 20,
                "rdata" => parent::getrates($this->sLottoId, $disk, 20, $subidkey),
                "subid" => $subidkey,
                "disk" => $disk,
                "title" => $subidval
            );
            $strTbl .= $this->crt_000To999R3($dataArr, $titleTr);
        }
        $strTbl .= "<tr><td colspan=\"7\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"7\" class=\"td2\"  align=\"right\"><a class=\"tooltipsSite\" href=\"#tooltipsSite\"><img src=\"image/help01.png\" alt=\"说明\" border=\"0\" width=\"20\"><SPAN><DIV  style=\"text-align:left\">一般号码包含 : 012, 013, 014, 015, 016, 017, 018... 等三码都相异之号码组?<hr />对对号码包含 : 001, 002, 003, 004, 005, 006, 007, 008, 009, 011...等,有2码相同1码相异的号码组<hr />&#35961;子号码包含 : 000, 111, 222, 333, 444, 555, 666, 777, 888, 999 三码都相同之号码组</DIV></SPAN></a></td></tr>";
        $strTbl .= "</table>";
        $this->tblNo++;
        return $strTbl;
    }

    public function show_g($disk = 1, $subid = 0, $g3Flag = true)
    {
        $strTbl = "";
        $strArr = array ();
        if ($g3Flag)
        {
            $showArr = array (24 => 5, 25 => 6, 26 => 7, 27 => 8, 28 => 9, 29 => "全包");
            $sTitle = $this->betArr[$subid] . "◎组选三";
        }
        else
        {
            $showArr = array (30 => 4, 31 => 5, 32 => 6, 33 => 7, 34 => 8);
            $sTitle = $this->betArr[$subid] . "◎组选六";
        }
        $strTbl .= "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\" cellpadding=\"0\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $sTitle . "</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\">";
        $strTbl .= "<tr class=\"bgClc_" . $this->gametype . "\"><td  colspan=\"11\" style=\"text-align:right;\">&nbsp;";
        if ($this->sLottoId == 0 && $subid == 0)
        {
            $strTbl .= "<input type=\"submit\" name=\"synSub0toSub12\" id=\"synSub0toSub12\" class=\"btnchoice\" value=\"同步前三，中三赔率\" />";
        }
        $strTbl .= "<span id=\"spnBetBtn\">";
        foreach ($this->betArr as $key => $val)
        {
            if ($key == $subid)
            {
                $class = "btnchoiced";
            }
            else
            {
                $class = "btnchoice";
            }
            $strTbl .= "<input type=\"button\" id=\"btnR2pType\" value=\"" . $val . "\" class=\"" . $class . "\" />";
        }
        $strTbl .= "</span>";
        $strTbl .= "</td></tr>";
        $strTbl .= "<tr>";
        $btnArr = array ();
        foreach ($showArr as $key => $val)
        {
            $strTbl .= "<th><input class=\"btnmin\" type=\"button\" value=\"-\"/>&nbsp;" . $val . "&nbsp;<input class=\"btnplus\" type=\"button\" value=\"+\"/></th>";
            $btnArr[] = "选" . $val . "码";
            $rdataArr = array (
                "bettype" => $key,
                "rdataStr" => parent::getrates($this->sLottoId, $disk, $key, $subid),
                "subid" => $subid,
                "disk" => $disk
            );
            $strArr[$key] = "<td valign=\"top\" style=\"padding:0;\" class=\"td2\">" . $this->crt_g($rdataArr) . "</td>";
        }
        $strTbl .= "</tr></thead>";
        $strTbl .= "<tbody>";
        $strTbl .= "<tr id=\"myGTr\">" . implode("", $strArr) . "</tr>";
        $strTbl .= "</tbody>";
        $strTbl .= "<tfoot>";
        $strTbl .= $this->crt0To9QuickBtn($btnArr, 11, true);
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</tfoot>";
        $strTbl .= "</table>";
        $strTbl .= "<input type=\"hidden\" name=\"subid\" value=\"" . $subid . "\" />";
        $strTbl .= "<input type=\"hidden\" name=\"subFlag\" value=\"1\" />";
        return $strTbl;
    }

    public function show_r1bs($disk = 1, $subid = 0)
    {
        $strDisk = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        foreach ($this->betArr as $key => $val)
        {
            $rateStr = parent::getrates($this->sLottoId, $disk, 47, $key);
            if ($rateStr != false)
            {
                $strTbl .= $this->crt_0To9B($rateStr, 47, $key, $disk, $val . "跨度");
            }
        }
        $strTbl .= $this->crt0To9QuickBtn($this->betArr, 11);
        $strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }
	
	public function show_nn($disk = 1,$showArr,$bettype)
    {
        $strTbl = "";
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl .= "</tr></thead>";
        $rdata = parent::getrates($this->sLottoId, $disk, $bettype, 0);
		foreach ($showArr as $i => $val)
        {
			if($i%5==0) $strTbl .= "<tr class=\"td2\" align=\"center\">";
			$setBtnName =  "n_".$bettype."_0_" . $disk . "_" . $i;
			$tempStr = "<th class=\"td6\">" . $val . "</th>";
			$rateIdx = "r" . str_pad($i, 2, "0", STR_PAD_LEFT);
			$rate = floatval($rdata[$rateIdx]);
			$tempStr .= "<td><input type=\"text\" class=\"iptRate\" size=\"3\" value=\"" . $rate . "\" name=\"" . $setBtnName . "\" />";
			$tempStr .= "<input onclick=\"btnAdd1(" . $setBtnName . ",-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1(" . $setBtnName . ",0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
			$tempStr .= "</td>";
			$strTbl.=$tempStr;
			if($i%5==4) $strTbl .= "</tr>";
        }
		if($i%5!=4) $strTbl .= "<th></th><td></td></tr>";
		$strTbl .= "<tr><td colspan=\"11\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }
}

?>